home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / input.arc / INPUT.BAS next >
Encoding:
BASIC Source File  |  1987-09-26  |  872 b   |  27 lines

  1. ' Input.bas  Demonstrates use of Mh.String.Input
  2.  
  3. Rem $Include: 'Mhinit.sub'
  4. Rem $Include: 'Mhstrin.sub'
  5. Rem $Include: 'Mhspeakr.sub'
  6.  
  7.     CALL Mh.Init(Monitor%, Mh.Cursor.Normal.Start%, Mh.Cursor.Normal.End%, Mh.Cursor.Insert.Start%, Mh.Cursor.Insert.End%)
  8.     CLS
  9.     Mh.Response$ = "This is the string to edit"
  10.     Mh.Input.Mask$ = "Aabbb"
  11.     LOCATE 10, 10   ' Tells input routine where edited data starts.
  12.             ' If you want the edit to begin at a point other
  13.             ' than the first character, assign a value to
  14.             ' Mh.Current.Pos% where the value is the Mid$ point
  15.             ' in the string.
  16.  
  17.     CALL Mh.String.Input(Mh.Response$, Mh.Input.Mask$, Mh.Current.Pos%, Mh.Cursor.Normal.Start%, Mh.Cursor.Normal.End%, Mh.Cursor.Insert.Start%, Mh.Cursor.Insert.End%)
  18.  
  19.     LOCATE 15, 10
  20.     PRINT "Your response was:"
  21.     LOCATE 16, 10
  22.     PRINT CHR$(34); Mh.Response$; CHR$(34)
  23.     END
  24.     
  25.  
  26.  
  27.